import React, { Component } from 'react'
import { createForm } from 'rc-form'
import { FormattedMessage } from 'react-intl'
import { InputItem, Button, Picker, List, Toast } from 'antd-mobile'



class WithDraw extends Component {
  state = {
    banks: []
  }
  render() {
    const { getFieldProps } = this.props.form
    const { banks } = this.state
    return (
      <div className="rt-withdraw-container">
        <h3>可提现金额：<span>3,686.90元</span></h3>
        <InputItem
          {...getFieldProps('money')}
          placeholder="请输入提现金额"
          extra="元"
        />
        <Picker
          {...getFieldProps('bank')}
          data={banks}
          cols={1}
          extra="请选择银行卡"
        >
          <List.Item arrow="down" className="cm-picker-item -bgColor"/>
        </Picker>
        <InputItem
          {...getFieldProps('password')}
          className="-bgColor"
          type="password"
          placeholder="请输入交易密码"
          extra="元"
        />
        <Button
          className="cm-main-button"
          onClick={
            () => {
              this.onFetchWithDraw()
            }
          }
        >
          提交
        </Button>
        <div className="-withdraw-describe">
          <p>
            <FormattedMessage id="describethree"/>
          </p>
        </div>
      </div>
    )
  }
}

export default createForm()(WithDraw)